package bank;

public class Process {
	private boolean hasrelease = false;
	private String pname;
	private Source max = new Source();
	private Source alloc = new Source();
	private Source need = new Source();
	public String getPname() {
		return pname;
	}
	public void setPname(String pname) {
		this.pname = pname;
	}
	public Source getMax() {
		return max;
	}
	public void setMax(Source max) {
		this.max = max;
		Source s = new Source();
		s.setA(getMax().getA()-getAlloc().getA());
		s.setB(getMax().getB()-getAlloc().getB());
		s.setC(getMax().getC()-getAlloc().getC());
		setNeed(s);
	}
	public Source getAlloc() {
		return alloc;
	}
	public void setAlloc(Source alloc) {
		this.alloc = alloc;
		Source s = new Source();
		s.setA(getMax().getA()-getAlloc().getA());
		s.setB(getMax().getB()-getAlloc().getB());
		s.setC(getMax().getC()-getAlloc().getC());
		setNeed(s);
	}
	public Source getNeed() {
		return need;
	}
	public void setNeed(Source need) {
		this.need = need;
	}
	public boolean isHasrelease() {
		return hasrelease;
	}
	public void setHasrelease(boolean hasrelease) {
		this.hasrelease = hasrelease;
	}
	
}
